<h1>Listing News</h1>

<table style="margin-left:10px;">
  <tr>
    <th>Title</th>
    <th>Body</th>
    <th>Published</th>
  </tr>

<% @news.each do |news_page| %>
  <tr>
    <td><%=h news_page.title %></td>
    <td><%=h news_page.body %></td>
    <td><%=h news_page.published %></td>
    <td><%= link_to 'Show', admin_news_page_path(news_page.id) %></td>
    <td><%= link_to 'Edit', edit_admin_news_page_path(news_page.id) %></td>
    <td><%= link_to 'Destroy', admin_news_page_path(news_page.id), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New News', new_admin_news_page_path %>